set(SERIALIZER_TARGET tflite-serializer)

FILE(GLOB_RECURSE TFLITE_SRCS "*.cpp")

ADD_LIBRARY(${SERIALIZER_TARGET} SHARED ${TFLITE_SRCS}) 

include_directories(include)


target_link_libraries(${SERIALIZER_TARGET} ${TENGINE_LIBRARY} )

SET_TARGET_PROPERTIES(${SERIALIZER_TARGET} PROPERTIES VERSION ${SERIALIZER_VERSION} SOVERSION ${SERIALIZER_SO_VERSION})

install(TARGETS ${SERIALIZER_TARGET} DESTINATION lib)

#below is for static library

ADD_LIBRARY(${SERIALIZER_TARGET}-static STATIC ${TFLITE_SRCS} )
SET_TARGET_PROPERTIES(${SERIALIZER_TARGET}-static PROPERTIES OUTPUT_NAME  ${SERIALIZER_TARGET})

ADD_DEPENDENCIES(${SERIALIZER_TARGET} ${SERIALIZER_TARGET}-static)

install(TARGETS ${SERIALIZER_TARGET}-static DESTINATION lib)
